<script setup>
  import slUniCalendar from './components/sl-uni-calendar/sl-uni-calendar'
  import {getTaskApi} from '@/apis/my.js'
  import {onLoad} from "@dcloudio/uni-app"
  import {ref} from 'vue'
  onLoad(()=>{
	  getList()
  })
  const list=ref({})
  const getList=async()=>{
	const res=await getTaskApi({month:'07',year:'2023'})
	console.log(res);
	list.value=res.data
  }

</script>

<template>
  <view class="page-container">
    <sl-uni-calendar :show-month="false" >
      <view class="data-overview">
        <view class="item">
          <text class="volumn">{{list.completedAmounts}}</text>
          <text class="label">任务总量</text>
        </view>
        <view class="item">
          <text class="volumn">{{list.taskAmounts}}</text>
          <text class="label">完成任务量</text>
        </view>
        <view class="item">
          <text class="volumn">{{list.transportMileage}}</text>
          <text class="label">运输里程(km)</text>
        </view>
      </view>
    </sl-uni-calendar>
  </view>
</template>

<style lang="scss" scoped>
  @import './index.scss';
</style>
